DOS INT 21 Function Chart
Func (AH) Sub Func (AL) Purpose Register Usage (C stands for Calling, R stands for Return)
AX BX CX DX SI DI DS ES BP
00

Terminate Program

C
01

Keyboard Input with Echo

CR
02

Display Output

C C
03

Auxiliary Input

CR
04 Auxilliary Output C C
05 Printer Output C C
06 Direct Console I/O CR C
07 Direct STDIN Input CR
08 STDIN Input CR
09 Display String C C C
0A Buffered STDIN Input C C C
0B Check STDIN Status CR
0C Clear Buffer and Input CR C C
0D Reset Disk C
0E Select Disk CR C C
0F Open File (FCB) CR C C
10 Close File (FCB) CR C C
11 Search for First Entry (FCB) CR C C
12 Search for Next Entry (FCB) CR C C
13 Delete File (FCB) CR C C
14 Read Sequential File (FCB) CR C C
15 Write Sequential File (FCB) CR C C
16 Create File (FCB) CR C C
17 Rename File (FCB) CR C C
18 Reserved
19 Get Default Drive CR
1A Get DTA Address C C C
1B Get Allocation Table Info CR R R R R
1C Get Allocation Table Info for Specific Drive CR R R CR
1D Reserved
1E Reserved
1F Get Default Disk Parameter Block CR R
20 Reserved
21 Random File Read (FCB) CR C
22 Random File Write (FCB) CR C
23 Get File Size (FCB) CR C
24 Set Random Record Field (FCB) C C
25 Set Interrupt Vector C C
26 Create PSP C C
27 Random Block Read (FCB) CR CR C
28 Random Block Write (FCB) CR CR C
29 Parse File Name CR CR CR CR CR
2A Get System Date CR R R
2B Set System Date CR C C
2C Get System Time C R R
2D Set System Time CR C C
2E Set Verify Flag C C
2F Get DTA Address C R R
30 Get DOS Version Number CR R R
31 Terminate and Stay Resident C C
32 Get Drive Parameter Block CR R C R
33 Get/Set Ctrl-Break Flag C CR
34 Return Address of InDOS Flag C R R
35 Get Interrupt Vector C R R
36 Get Free Disk Space CR R R CR
37 Get/Set Switchchar CR R
38 Get/Set Country Info CR CR CR CR
39 Create Subdirectory CR C C
3A Remove Subdirectory CR C C
3B Set Directory CR C C
3C Create/Truncate File (handle) CR C C C
3D Open File (handle) CR C C
3E Close File (handle) CR C
3F Read File or Device (handle) CR C C C C
40 Write to File or Device (handle) CR C C C C
41 Delete File CR C C
42 Move File Pointer CR C C CR
43 Get/Set File Attributes CR C C
44 00 Get Device Information CR C R
01 Set Device Information CR C C
02 Character Device Read CR C C C C
03 Character Device Write CR C C C C
04 Block Driver Read CR C C C C
05 Block Driver Write CR C C C C
06 Get Input Status CR C
07 Get Output Status CR C
08 Block Device Removable? CR C
09 Block Device Local or Remote? CR C R
0A Handle Local or Remote? CR C R
0B Set Sharing Retry Count CR C C
45 Duplicate Handle CR C
46 Force Duplicate Handle CR C C
47 Get Current Directory CR C CR CR
48 Allocate Memory CR CR CR
49 Release Memory CR C
4A Modify Memory Allocation CR CR C
4B 00 Execute Program (Exec) CR C C C C
03 Load Overlay CR C C C C
4C Terminate with Return Code C
4D Get Return Code CR
4E Search for First Match CR C C C
4F Search for Next Match CR
50 Set PSP Segment C C
51 Get PSP Segment C R
52 Get Disk List C R R
53 Translate BPB C C C C C
54 Get Verify Flag CR
55 Create PSP C C
56 Rename File CR C C C C
57 00 Get File Date and Time CR C R R
01 Set File Date and Time CR C C
58 00 Get Allocation Strategy CR
01 Set Allocation Strategy CR C
59 Get Extended Error Info CR CR R
5A Create Temporary File CR C CR
5B Create File CR C C
5C Set File Access CR C C C C
5D Get Critical Error Flag Address C R R
5E 00 Get Machine Name CR R CR CR
02 Set Printer Setup CR C C C C
03 Get Printer Setup CR C R CR CR
5F 02 Get Redirection List Entry CR CR CR CR CR CR CR
03 Redirect Device CR C C C C C C
04 Cancel Redirection CR C C
60 Reserved
61 Reserved
62 Get PSP Address C R
63 00 Get System Lead Byte Table C R R
01 Set Interim Console Flag C C
02 Get Interim Console Flag C R
64 Reserved
65 Get Extended Country Info CR C C C CR CR
66 01 Get Global Code Page CR R R
02 Set Global Code Page CR C C
67 Set Handle Count CR C
68 Flush Buffer CR C